package com.lzc.springboot.controller;

import com.lzc.springboot.domain.Crop;
import com.lzc.springboot.domain.ResultInfo;
import com.lzc.springboot.service.CropService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/crop")
public class CropController {

  @Autowired
  private CropService cropService;

  @RequestMapping("/findAll")
  public ResultInfo<Crop[]> findAll(){
    return cropService.findAll();
  }
}
